\hypertarget{motors_8c}{
\section{atmega1281/mid/motors/motors.c File Reference}
\label{motors_8c}\index{atmega1281/mid/motors/motors.c@{atmega1281/mid/motors/motors.c}}
}
{\ttfamily \#include $<$stdint.h$>$}\par
{\ttfamily \#include $<$stdlib.h$>$}\par
{\ttfamily \#include \char`\"{}nxbot.h\char`\"{}}\par
{\ttfamily \#include $<$avr/pgmspace.h$>$}\par
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{motors_8c_ab5dd5ba8e3d2e3343251bf8bb3e526ea}{OFFSET\_\-DEAD\_\-ZONE}~20
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__nxbot__motors_ga4e438b0560e5f51111b840ec0ae7a470}{motors\_\-getActualVels} (\hyperlink{structvelocities__t}{velocities\_\-t} $\ast$vels, unsigned int sampleFreq)
\begin{DoxyCompactList}\small\item\em Updates the {\ttfamily velocities} structure with the actual velocities of the robots. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__motors_ga1669ce1fedb2a775eaac797e0f6a6324}{motors\_\-init} (unsigned char freqPWM)
\begin{DoxyCompactList}\small\item\em Initializes all the hardware used for the motors (encoders and pwm). \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__motors_gacb966263b9e0b54a8c75e2b4db16afc4}{motors\_\-setVel} (int vel, unsigned char motor)
\begin{DoxyCompactList}\small\item\em Sets the desired velocity for each motor. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
unsigned char motorLinear\mbox{[}21\mbox{]} \hyperlink{motors_8c_a90ffbd928c3aa6ff711ff1de30d2f2d0}{PROGMEM} = \{0, 1, 3, 4, 6, 7, 9, 11, 13, 15, 17, 20, 23, 26, 30, 35, 40, 47, 58, 75, 100\}
\end{DoxyCompactItemize}


\subsection{Define Documentation}
\hypertarget{motors_8c_ab5dd5ba8e3d2e3343251bf8bb3e526ea}{
\index{motors.c@{motors.c}!OFFSET\_\-DEAD\_\-ZONE@{OFFSET\_\-DEAD\_\-ZONE}}
\index{OFFSET\_\-DEAD\_\-ZONE@{OFFSET\_\-DEAD\_\-ZONE}!motors.c@{motors.c}}
\subsubsection[{OFFSET\_\-DEAD\_\-ZONE}]{\setlength{\rightskip}{0pt plus 5cm}\#define OFFSET\_\-DEAD\_\-ZONE~20}}
\label{motors_8c_ab5dd5ba8e3d2e3343251bf8bb3e526ea}


\subsection{Variable Documentation}
\hypertarget{motors_8c_a90ffbd928c3aa6ff711ff1de30d2f2d0}{
\index{motors.c@{motors.c}!PROGMEM@{PROGMEM}}
\index{PROGMEM@{PROGMEM}!motors.c@{motors.c}}
\subsubsection[{PROGMEM}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char motorLinear \mbox{[}21\mbox{]} {\bf PROGMEM} = \{0, 1, 3, 4, 6, 7, 9, 11, 13, 15, 17, 20, 23, 26, 30, 35, 40, 47, 58, 75, 100\}}}
\label{motors_8c_a90ffbd928c3aa6ff711ff1de30d2f2d0}
